package cn.stylefeng.guns.modular.gridsystem.service;

import cn.stylefeng.guns.core.pojo.page.PageResult;
import cn.stylefeng.guns.modular.gridsystem.entity.BizGatewayChannel;
import cn.stylefeng.guns.modular.gridsystem.model.param.BizGatewayChannelParam;
import cn.stylefeng.guns.modular.gridsystem.model.result.BizGatewayChannelResult;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * biz_gateway_channel 服务类
 *
 * @author 乔李莱莱
 * @since 2023/10/17
 */
public interface BizGatewayChannelService extends IService<BizGatewayChannel> {

    /**
     * 分页查询biz_gateway_channel
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    PageResult<BizGatewayChannel> page(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 查询所有biz_gateway_channel
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    List<BizGatewayChannelResult> list(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 查询所有biz_gateway_channel
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    List<BizGatewayChannelResult> listChannel(BizGatewayChannelParam param);

    /**
     * 添加biz_gateway_channel
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    void add(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 删除biz_gateway_channel
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    void delete(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 编辑biz_gateway_channel
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    boolean edit(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 查看详情biz_gateway_channel
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    BizGatewayChannel detail(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 通过网关id列表
     * @param gatewayId
     * @param micRouter
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    BizGatewayChannel listByGatewayId(Integer gatewayId, String micRouter);

    /**
     * 查询通道列表
     * @param bizGatewayChannelParam
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    List<BizGatewayChannelResult> listByGId(BizGatewayChannelParam bizGatewayChannelParam);

    /**
     * 分页查询biz_gateway_channel
     * @param param
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    PageResult<BizGatewayChannelResult> pageList(BizGatewayChannelParam param);

    /**
     * 通过id和通道获取总数
     *
     * @param param
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    Integer countByDIdAndChannel(BizGatewayChannelParam param);

    /**
     * 修改网关信息
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    void editById(BizGatewayChannelParam param);

    /**
     * 通道解除绑定
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    void unbinding(BizGatewayChannelParam param);

    /**
     * 通道标记
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    void mark(BizGatewayChannelParam param);

    /**
     * 查询通道绑定信息
     *
     * @author 乔李莱莱
     * @since 2023/10/17
     */
    String queryChannelBindingInfo(BizGatewayChannelParam param);

    /**
     * 根据网关id和通道获取网关通道
     *
     * @param gatewayId 网关id
     * @param channel   通道
     * @return BizGatewayChannel 网关通道
     */
    BizGatewayChannel getBizGatewayChannel(Integer gatewayId, String channel);

    void toAdd(BizGatewayChannelParam bizGatewayChannelParam);

    void toEdit(BizGatewayChannelParam bizGatewayChannelParam);
}
